# coding: utf-8
from sqlalchemy import create_engine
from datahouse.qp_dstore.qp_dstore.data_store import DataStore
from options import get_option


class AQDataServer:
    """
        This is the server instance for providing data to request from the network.
    """

    def __init__(self):
        self.store = DataStore.get_instance()
        # Mimic remote sql engine
        if self.store:
            self.store._sql_engine = create_engine(get_option("sql_uri"))

    def get_data_store(self):
        """ This is a temporary usage.
            The store object should be wrapped up and only expose get methods.
            """
        return self.store

